<%- include('../includes/head.ejs') %>
    <link rel="stylesheet" href="/css/orders.css">
    </head>

<body>
<!--<%- include('../includes/navigation.ejs') %>-->
<main>
    <% if (orders.length <= 0) { %>
        <h1>Nothing there!</h1>
    <% } else { %>
        <ul class="orders">
            <% orders.forEach(order => { %>
                <li class="orders__item">
                    <h1># <%= order._id %></h1>
                    <ul class="orders__products">
                        <% order.items.forEach(product => { %>
                            <li class="orders__products-item"><%= product.title %> (<%= product.quantity %>)</li>
                        <% }); %>
                    </ul>
                </li>
            <% }); %>
        </ul>
    <% } %>
</main>
<%- include('../includes/end.ejs') %>
